From 3de0701f24a72061354e4d36cd9c2995f87a69e1 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 28 Jul 2003 22:59:01 +0000 Subject: [PATCH] yet more totally gratituous warning cleanups. --- gpsbabel/cetus.c | 7 ++++--- gpsbabel/coldsync/util.c | 4 ++-- gpsbabel/copilot.c | 1 + gpsbabel/garmin.c | 2 +- gpsbabel/gcdb.c | 1 + gpsbabel/geo.c | 1 + gpsbabel/gpsutil.c | 1 + gpsbabel/holux.c | 1 + gpsbabel/magnav.c | 4 +++- gpsbabel/mapsend.c | 1 + gpsbabel/psp.c | 1 + gpsbabel/quovadis.c | 4 ++-- gpsbabel/tmpro.c | 1 + gpsbabel/tpg.c | 3 ++- gpsbabel/util.c | 2 +- 15 files changed, 23 insertions(+), 11 deletions(-) diff --git a/gpsbabel/cetus.c b/gpsbabel/cetus.c index bceb5099e..bc6c2ecc3 100644 --- a/gpsbabel/cetus.c +++ b/gpsbabel/cetus.c @@ -165,8 +165,9 @@ data_read(void) wpt_tmp->position.latitude.degrees = be_read32(&rec->latitude) / 10000000.0; if (be_read16(&rec->year) != 0xff) { - struct tm tm = {0}; - + struct tm tm; + + memset (&tm, sizeof(tm), 0); tm.tm_min = rec->min; tm.tm_hour = rec->hour; tm.tm_mday = rec->day; @@ -358,5 +359,5 @@ ff_vecs_t cetus_vecs = { wr_deinit, data_read, data_write, - cetus_args + cetus_args, }; diff --git a/gpsbabel/coldsync/util.c b/gpsbabel/coldsync/util.c index 792361740..675a683a4 100644 --- a/gpsbabel/coldsync/util.c +++ b/gpsbabel/coldsync/util.c @@ -12,7 +12,7 @@ * native format, convert them to Palm (big-endian) format, and write * them to a ubyte string. * - * $Id: util.c,v 1.1 2002-08-16 06:13:10 robertl Exp $ + * $Id: util.c,v 1.2 2003-07-28 22:59:01 robertl Exp $ */ #include "config.h" @@ -249,7 +249,7 @@ void debug_dump(FILE *outfile, const char *prefix, const ubyte *buf, const udword len) { - int lineoff; + unsigned int lineoff; for (lineoff = 0; lineoff < len; lineoff += 16) { diff --git a/gpsbabel/copilot.c b/gpsbabel/copilot.c index bb98370aa..1147b4aac 100644 --- a/gpsbabel/copilot.c +++ b/gpsbabel/copilot.c @@ -208,4 +208,5 @@ ff_vecs_t copilot_vecs = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/garmin.c b/gpsbabel/garmin.c index b1c15607c..c1202fda2 100644 --- a/gpsbabel/garmin.c +++ b/gpsbabel/garmin.c @@ -287,5 +287,5 @@ ff_vecs_t garmin_vecs = { rw_deinit, data_read, data_write, - + NULL }; diff --git a/gpsbabel/gcdb.c b/gpsbabel/gcdb.c index 1d54eb0ce..9a9c7b364 100644 --- a/gpsbabel/gcdb.c +++ b/gpsbabel/gcdb.c @@ -342,4 +342,5 @@ ff_vecs_t gcdb_vecs = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/geo.c b/gpsbabel/geo.c index 8e23c5434..959669f55 100644 --- a/gpsbabel/geo.c +++ b/gpsbabel/geo.c @@ -271,4 +271,5 @@ ff_vecs_t geo_vecs = { geo_wr_deinit, geo_read, geo_write, + NULL }; diff --git a/gpsbabel/gpsutil.c b/gpsbabel/gpsutil.c index 9afee7cee..ed5743e5a 100644 --- a/gpsbabel/gpsutil.c +++ b/gpsbabel/gpsutil.c @@ -119,4 +119,5 @@ ff_vecs_t gpsutil_vecs = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/holux.c b/gpsbabel/holux.c index 92cc31dc3..3a1e8091d 100644 --- a/gpsbabel/holux.c +++ b/gpsbabel/holux.c @@ -301,4 +301,5 @@ ff_vecs_t holux_vecs = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/magnav.c b/gpsbabel/magnav.c index 2788a36c8..8d61b2600 100644 --- a/gpsbabel/magnav.c +++ b/gpsbabel/magnav.c @@ -109,8 +109,9 @@ data_read(void) for(pdb_rec = pdb->rec_index.rec; pdb_rec; pdb_rec=pdb_rec->next) { waypoint *wpt_tmp; char *vdata; - struct tm tm = {0}; + struct tm tm; + memset (&tm, sizeof(tm), 0); wpt_tmp = xcalloc(sizeof(*wpt_tmp),1); rec = (struct record *) pdb_rec->data; wpt_tmp->position.altitude.altitude_meters = be_read32(&rec->elevation); @@ -272,4 +273,5 @@ ff_vecs_t magnav_vec = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index 743506a3d..eb89e72c6 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -658,4 +658,5 @@ ff_vecs_t mapsend_vecs = { mapsend_wr_deinit, mapsend_read, mapsend_wpt_write, + NULL }; diff --git a/gpsbabel/psp.c b/gpsbabel/psp.c index 03884e50c..2451f57d1 100644 --- a/gpsbabel/psp.c +++ b/gpsbabel/psp.c @@ -545,4 +545,5 @@ ff_vecs_t psp_vecs = { psp_wr_deinit, psp_read, psp_write, + NULL }; diff --git a/gpsbabel/quovadis.c b/gpsbabel/quovadis.c index bcc226ae4..4d0b9ad67 100644 --- a/gpsbabel/quovadis.c +++ b/gpsbabel/quovadis.c @@ -52,7 +52,7 @@ static struct qv_icon_mapping mapping[] = { #define num_mappings (sizeof(mapping) / sizeof(struct qv_icon_mapping)) static geocache_type icon_to_wpt(int icon_bitmap) { - int i; + unsigned int i; for (i = 0; i < num_mappings; i++) { if (icon_bitmap == mapping[i].bitmap_id) { @@ -63,7 +63,7 @@ static geocache_type icon_to_wpt(int icon_bitmap) { } static int wpt_to_icon(geocache_type type) { - int i; + unsigned int i; for (i = 0; i < num_mappings; i++) { if (type == mapping[i].gc_type) { diff --git a/gpsbabel/tmpro.c b/gpsbabel/tmpro.c index 50dc1619d..8bc695659 100644 --- a/gpsbabel/tmpro.c +++ b/gpsbabel/tmpro.c @@ -255,5 +255,6 @@ ff_vecs_t tmpro_vecs = { wr_deinit, data_read, data_write, + NULL }; diff --git a/gpsbabel/tpg.c b/gpsbabel/tpg.c index 3a081cec0..0775cf936 100644 --- a/gpsbabel/tpg.c +++ b/gpsbabel/tpg.c @@ -34,7 +34,7 @@ static void *mkshort_handle; static int i_am_little_endian; static int endianness_tested; -static int waypt_out_count; +static unsigned int waypt_out_count; static void test_endianness(void) @@ -394,4 +394,5 @@ ff_vecs_t tpg_vecs = { tpg_wr_deinit, tpg_read, tpg_write, + NULL }; diff --git a/gpsbabel/util.c b/gpsbabel/util.c index fbca2b8be..5f68ec3c1 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -375,7 +375,7 @@ void le_read64(void *dest, const void *src) { char *cdest = dest; - char *csrc = src; + const char *csrc = src; doswap(); /* make sure i_am_little_endian is initialized */ -- 2.30.2